#ifndef _WINDOW_H_
#define _WINDOW_H_

#include <memory>
#include <string>
#include <Event/Event.h>
#include <functional>

namespace Engine2D
{
    enum WindowType
    {
        Window_SDL,
    };

    struct WindowArgs
    {
        std::string title;
        int x, y, width, height;
    };

    class Window
    {
    public:
        Window(WindowArgs args);
        virtual ~Window() = default;

        template<typename F>
        void SetEventCallback(F && fn) { m_eventHandler = std::forward<F>(fn); }

        virtual void PollEvent() {};
        virtual void * GetWindow() = 0;

    protected:
        WindowArgs m_args;
        std::function<void(EventPtr)> m_eventHandler;
    };

    std::shared_ptr<Window> CreateEngineWindow(WindowType type, WindowArgs args);

} // namespace Engine2D


#endif